
import java.util.Arrays;
public class Test04{
    public static void main(String[] args){
        //基本数据类型
        int a = 10;
        int b = a;
        System.out.println(a);//10
        System.out.println(b);//10

        a = 20;
        System.out.println(a);//20
        System.out.println(b);//10

        //引用数据类型
        int[] arr1 = new int[]{1,2,3};
        int[] arr2 = arr1;
        System.out.println(arr1[0]);//1
        System.out.println(arr2[0]);//1

        arr1[0] = 100;
        System.out.println(arr1[0]);//100
        System.out.println(arr2[0]);//100

        int[] arr = {1,8,5,7,2,9};
        System.out.println(Arrays.toString(arr));
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));




    }

}